﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace EnglishRegister.Utilities
{
    public enum CourseLevel { Primary = 0, Intermediate = 1, High = 2 }
    public enum CourseLearnTime { Even = 0, Uneven = 1 }
    public enum FiIterType { All, StartingClass, TimeEven, TimeUneven }

    public class UtilitiesTools
    {
        public static DialogResult ShowErrorMessage(string strMessage)
        {
            return MessageBox.Show(strMessage, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
        }

        public static DialogResult ShowWarning(string strMessage)
        {
            return MessageBox.Show(strMessage, "Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
        }

        public static void SetErrorFor(Control myControl, ErrorProvider eprCourse, string strMessage)
        {
            myControl.Focus();
            eprCourse.Clear();
            eprCourse.SetError(myControl, strMessage);
        }
    }
}
